home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / C⁄C++ OS8 / LayerGroups / LayerGroupsEngine.cp < prev    next >
Encoding:
Text File  |  1998-10-23  |  1.3 KB  |  69 lines  |  [TEXT/CWIE]

  1. /* LayerGroupsEngine.cp -- application-specific data management */
  2.  
  3. /* This module contains data structures to access the data in your */
  4. /* document's file(s). The purpose is to isolate the details of the */
  5. /* data representation into this module and to provide accessor */
  6. /* functions for reading/writing logical pieces of the data. */
  7. /* For your application, you will probably rewrite most of this. */
  8. /* This module will not be regenerated by AppMaker unless you delete it. */
  9.  
  10. #include <Types.h>
  11. #include <Quickdraw.h>
  12. #include <Controls.h>
  13. #include <Events.h>
  14. #include <Lists.h>
  15. #include <Menus.h>
  16. #include <TextEdit.h>
  17.  
  18. #include "DDocData.h"
  19. #include "Globals.h"
  20. #include "Miscellany.h"
  21. #include "LayerGroupsEngine.h"
  22.  
  23.  
  24. //----------
  25. LayerGroupsEngine::LayerGroupsEngine ()
  26. {
  27.     mDocData = nil;
  28.     mFileType = kFileType;
  29.     mSignature = kSignature;
  30. }
  31.  
  32. //----------
  33. LayerGroupsEngine::~LayerGroupsEngine ()
  34. {
  35.     if (mDocData != nil) {
  36.         delete mDocData;
  37.     }
  38. }
  39.  
  40. //----------
  41. void    LayerGroupsEngine::InitData ()
  42. {
  43.     mDocData = new DDocData;
  44. }
  45.  
  46. //----------
  47. void    LayerGroupsEngine::DisposeData ()
  48. {
  49.     delete mDocData;
  50.     mDocData = nil;
  51. }
  52.  
  53. //----------
  54. void    LayerGroupsEngine::ReadFile ()
  55. {
  56.     InitData ();
  57.     mDirty = false;
  58.  
  59.     mDocData->ReadFromFile (this);
  60. }
  61.  
  62. //----------
  63. void    LayerGroupsEngine::WriteFile ()
  64. {
  65.     mDirty = false;
  66.  
  67.     mDocData->WriteToFile (this);
  68. }
  69.